﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using NopSolutions.NopCommerce.Common.Utils;
using NopSolutions.NopCommerce.BusinessLogic.Alesko;

namespace NopSolutions.NopCommerce.Web.Modules
{
  public partial class HtmlContentControl : BaseNopFrontendUserControl
  {

    public void BindData()
    {
      HtmlContent HtmlContent = this.HtmlContentService.GetHtmlContentById(this.ContentId);
      divContent.InnerHtml = HtmlContent.ContentHtml;
    }

    protected void Page_Load(object sender, EventArgs e)
    {
      if (!IsPostBack)
        BindData();
    }

    public int ContentId
    {
      get
      {
        return CommonHelper.QueryStringInt("ContentId");
      }
    }
  }
}